package com.open.capacity.finance.util;


import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.itextpdf.text.*;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.open.capacity.finance.constant.AuditWarnCategorys;
import com.open.capacity.finance.constant.DealFlags;
import com.open.capacity.finance.dto.SourcePzErrorDto;
import com.open.capacity.finance.dto.audit_model_39.AuditModelStep1;
import com.open.capacity.finance.dto.audit_model_43.AuditModelResult;
import com.open.capacity.finance.entity.AuditModelWarn;
import com.open.capacity.finance.entity.SourceBaseBusinesspay;
import com.open.capacity.utils.BigDecimalUtil;
import com.open.capacity.utils.DateUtil;
import com.open.capacity.utils.StringUtil;
import org.apache.commons.collections4.CollectionUtils;

import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

public class PdfAuditModelReport {
    // 定义全局的字体静态变量
    private static Font titlefont;

    private static Font a1font;

    private static Font a11font;

    private static Font headfont;
    private static Font keyfont;
    private static Font textfont;
    // 最大宽度
    private static int maxWidth = 520;

    // 静态代码块
    static {
        try {
            // 不同字体（这里定义为同一种字体：包含不同字号、不同style）
            BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
            titlefont = new Font(bfChinese, 22, Font.BOLD);
            a1font = new Font(bfChinese, 16, Font.NORMAL);
            a11font = new Font(bfChinese, 12, Font.NORMAL);
            headfont = new Font(bfChinese, 10, Font.NORMAL);
            keyfont = new Font(bfChinese, 10, Font.NORMAL);
            textfont = new Font(bfChinese, 10, Font.NORMAL);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    // 生成PDF文件
    public void generatePDF(Document document, String fileuploadPath, List<AuditModelWarn> data) throws Exception {
        data.sort(Comparator.comparing(t -> Integer.parseInt(t.getModelId()), Comparator.nullsLast(Integer::compareTo)));

        // 标题
        Paragraph empty = new Paragraph(" ", titlefont);
        empty.setSpacingAfter(200f); //设置段落下空白

        Paragraph title = new Paragraph("内审监督管理平台风险评估报告", titlefont);
        title.setAlignment(1); //设置文字居中 0靠左   1，居中     2，靠右
        title.setIndentationLeft(12); //设置左缩进
        title.setIndentationRight(12); //设置右缩进
        title.setLeading(20f); //行间距
        title.setSpacingAfter(400f); //设置段落下空白

        // 计划名称
        Paragraph planName = new Paragraph("报告批次：" + data.get(0).getPlanName(), a1font);
        planName.setAlignment(1); //设置文字居中 0靠左   1，居中     2，靠右
        planName.setIndentationLeft(12); //设置左缩进
        planName.setIndentationRight(12); //设置右缩进
        planName.setLeading(20f); //行间距
        planName.setSpacingBefore(15f); //设置段落上空白
        planName.setSpacingAfter(15f); //设置段落下空白

        // 报告日期
        Paragraph createDate = new Paragraph("报告生成日期：" + DateUtil.format(new Date(), "yyyy年MM月dd日"), a1font);
        createDate.setAlignment(1); //设置文字居中 0靠左   1，居中     2，靠右
        createDate.setIndentationLeft(12); //设置左缩进
        createDate.setIndentationRight(12); //设置右缩进
        createDate.setLeading(20f); //行间距
        createDate.setSpacingBefore(15f); //设置段落上空白
        createDate.setSpacingAfter(15f); //设置段落下空白

        document.add(empty);
        document.add(title);
//        document.add(planName);
        document.add(createDate);
        document.newPage();

        //一、内审系统疑似问题报告评估依据
        Paragraph a1 = new Paragraph("一、内审系统疑似问题报告评估依据", a1font);
        a1.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a1.setIndentationLeft(12); //设置左缩进
        a1.setIndentationRight(12); //设置右缩进
        a1.setLeading(20f); //行间距
        a1.setSpacingBefore(25f); //设置段落上空白
        a1.setSpacingAfter(10f); //设置段落下空白

        Paragraph a11 = new Paragraph("          本内审风险评估依据主要从单位经济活动业务层面预算管理、收支管理、政府采购管理、资产管理、建设项目管理、合同管理以及其他方面进行内审疑似问题系统评估，结合各单位的执行域系统数据、核算域数据、穗检出行系统数据、决算数据、“真内控”管理系统数据，结合审计局大数据审计疑点模型和检察系统特有检察模型等方式得出报告。\n\n" + "          系统报告旨在提高检察院装备财务管理水平。对存在疑点及时进行解释或者修改处理。", a11font);
        a11.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a11.setIndentationLeft(18); //设置左缩进
        a11.setIndentationRight(12); //设置右缩进
        a11.setLeading(20f); //行间距

        document.add(a1);
        document.add(a11);


        long financeCount = data.stream().filter(t -> AuditWarnCategorys.FINANCE.getCode().equals(t.getCategory())).count();
        long payCount = data.stream().filter(t -> AuditWarnCategorys.PAY.getCode().equals(t.getCategory())).count();
        long reimburseCount = data.stream().filter(t -> AuditWarnCategorys.REIMBURSE.getCode().equals(t.getCategory())).count();
        long assetCount = data.stream().filter(t -> AuditWarnCategorys.ASSET.getCode().equals(t.getCategory())).count();
        long purchaseCount = data.stream().filter(t -> AuditWarnCategorys.PURCHASE.getCode().equals(t.getCategory())).count();
        long carCount = data.stream().filter(t -> AuditWarnCategorys.CAR.getCode().equals(t.getCategory())).count();
        long otherCount = data.stream().filter(t -> AuditWarnCategorys.OTHER.getCode().equals(t.getCategory())).count();

        //二、系统报告总体情况
        Paragraph a2 = new Paragraph("二、系统报告总体情况", a1font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a2.setIndentationLeft(12); //设置左缩进
        a2.setIndentationRight(12); //设置右缩进
        a2.setLeading(20f); //行间距
        a2.setSpacingBefore(25f); //设置段落上空白
        a2.setSpacingAfter(10f); //设置段落下空白

        Paragraph a21 = new Paragraph("          通过数据对比发现存在预算管理业务层面问题" + 1 + "条，收支业务管理层面" + 9 + "条，政府采购业务层面" + 0 + "条，资产管理业务层面" + 4 + "条，建设项目业务层面0条，合同管理业务层面0条。", a11font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a21.setIndentationLeft(18); //设置左缩进
        a21.setIndentationRight(12); //设置右缩进
        a21.setLeading(20f); //行间距

        document.add(a2);
        document.add(a21);

        //三、报告细化分析情况如下：
        Paragraph a3 = new Paragraph("三、报告细化分析情况如下：", a1font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a3.setIndentationLeft(12); //设置左缩进
        a3.setIndentationRight(12); //设置右缩进
        a3.setLeading(20f); //行间距
        a3.setSpacingBefore(25f); //设置段落上空白
        a3.setSpacingAfter(10f); //设置段落下空白

        // 00
        Paragraph a31 = null;
        Paragraph a311 = null;
        Paragraph a32 = null;
        Paragraph a321 = null;
        Paragraph a322 = null;
        Paragraph a33 = null;
        Paragraph a331 = null;
        Paragraph a34 = null;
        Paragraph a341 = null;
        if (data.get(0).getCompanyId().equals("00")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为298,609,298.43元，实际执行预算数为259,938,161.99元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 以前年度专项结余资金未上缴：累计结转余额为2,517,274.48元；\n" +
                    "          2. 无预算或超预算：列支六公经费；\n" +
                    "          3. 超范围列支：涉及27条记录，总金额为631,188.87；\n" +
                    "          4. 会议未在定点举办：涉及1条记录；\n" +
                    "          5. 广州市五区以外差旅补贴合理性核查：涉及1条记录，报销金额9,180.00元；\n" +
                    "          6. 财务规则校验预警：科目220105期初余额为负数；\n" +
                    "          7. 重复支付嫌疑：涉及7条记录；\n" +
                    "          8. 部门经济分类科目的其他支出占比预警：科目71010201:经济分类支出30199超过30%；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 违规使用非本单位的车辆：涉及3条记录；\n" +
                    "          2. 资产使用寿命预警：383条记录，20年以上111条，15-20年272条；\n" +
                    "          3. 资产价值预警：涉及7条记录，价值大于100万；\n" +
                    "          4. 检查无形资产管理情况：涉及1,545条记录；\n" +
                    "          5. 往来款长期（大额）挂账：涉及金额共计43,971,570.30元；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("01")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为74,751,619.96元，实际执行预算数为52,090,460.55元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 无预算或超预算：列支六公经费；\n" +
                    "          2. 超范围列支：涉及23条记录，总金额为128,271.30；\n" +
                    "          3. 广州市五区以外差旅补贴合理性核查：涉及10条记录；\n" +
                    "          4. 财务规则校验预警：涉及11笔记录；\n" +
                    "          5. 国赔发生预警：涉及2条记录，总金额为120,921.59元；\n" +
                    "          6. 部门经济分类科目的其他支出占比预警：科目71010102:经济分类支出30199超过30%；\n" +
                    "          7. 财务日常财务会计与预算会计基本校验：科目4001与6001余额存在差异、科目4601与6601余额存在差异；\n" +
                    "          8. 基层财务并账情况：涉及7笔记录；", a11font);

            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 往来款长期（大额）挂账：涉及金额共计1,014,623.06元；\n" +
                    "          2. 资产价值预警：涉及1条记录，价值大于100万；\n" +
                    "          3. 检查无形资产管理情况：涉及63条记录；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("02")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为77,092,472.15元，实际执行预算数为54,249,339.64元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 隐藏三公经费支出：涉及2条记录；\n" +
                    "          2. 超范围列支：涉及9条记录，总金额为58,558.80；\n" +
                    "          3. 广州市五区以外差旅补贴合理性核查：涉及26条记录；\n" +
                    "          4. 国赔发生预警：涉及2条记录，总金额为45,193.88元；\n" +
                    "          5. 财务规则校验预警：涉及4笔记录；\n" +
                    "          6. 基层财务并账情况：涉及7笔记录；", a11font);

            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 检查无形资产管理情况：涉及1,061条记录；\n" +
                    "          2. 往来款长期（大额）挂账：涉及金额共计33,876,764.36元；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("03")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为96,527,189.43元，实际执行预算数为58,311,710.24元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 超范围列支：涉及6条记录，总金额为15,054.10；\n" +
                    "          2. 广州市五区以外差旅补贴合理性核查：涉及5条记录；\n" +
                    "          3. 国赔发生预警：涉及1条记录，总金额为72,863.69元；\n" +
                    "          4. 财务规则校验预警：涉及7笔记录；\n" +
                    "          5. 部门经济分类科目的其他支出占比预警：科目71010102:经济分类支出30299超过30%；\n" +
                    "          6. 财务日常财务会计与预算会计基本校验：科目4001与6001余额存在差异、科目4601与6601余额存在差异；\n" +
                    "          7. 基层财务并账情况：涉及6笔记录；", a11font);

            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 往来款长期（大额）挂账：涉及金额共计2,132,257.05元；\n" +
                    "          2. 资产使用寿命预警：55条记录；\n" +
                    "          3. 资产价值预警：涉及2条记录，价值大于100万；\n" +
                    "          4. 检查无形资产管理情况：涉及38条记录；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("04")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为70,391,365.20元，实际执行预算数为46,929,218.34元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 无预算或超预算：列支六公经费；\n" +
                    "          2. 隐藏三公经费支出：涉及1条记录；\n" +
                    "          3. 超范围列支：涉及25条记录，总金额为140,686.00；\n" +
                    "          4. 广州市五区以外差旅补贴合理性核查：涉及5条记录；\n" +
                    "          5. 重复支付嫌疑：涉及1条记录，总金额为1,250.00元；\n" +
                    "          6. 财务规则校验预警：涉及6笔记录；\n" +
                    "          7. 部门经济分类科目的其他支出占比预警：科目71010202:经济分类支出30199超过30%、科目71010202:经济分类支出30299超过30%；\n" +
                    "          8. 财务日常财务会计与预算会计基本校验：科目4001与6001余额存在差异；\n" +
                    "          9. 基层财务并账情况：涉及6笔记录；", a11font);

            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 往来款长期（大额）挂账：涉及金额共计3,265,190.97\n元；\n" +
                    "          2. 资产使用寿命预警：25条记录；\n" +
                    "          3. 资产价值预警：涉及2条记录，价值大于100万；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("05")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为88,142,971.54元，实际执行预算数为61,404,773.66元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 无预算或超预算：列支六公经费；\n" +
                    "          2. 隐藏三公经费支出：涉及1条记录；\n" +
                    "          3. 广州市五区以外差旅补贴合理性核查：涉及15条记录；\n" +
                    "          4. 国赔发生预警：涉及4条记录，总金额为591,491.57元；\n" +
                    "          5. 重复支付嫌疑：涉及4条记录，总金额为9,360元；\n" +
                    "          6. 财务规则校验预警：涉及1笔记录；\n" +
                    "          7. 国赔发生预警：涉及2条记录，总金额为120,921.59元；\n" +
                    "          8. 部门经济分类科目的其他支出占比预警：科目71010102:经济分类支出30299超过30%、科目71010202:经济分类支出30199超过30%、科目71010202:经济分类支出30399超过30%；\n" +
                    "          9. 基层财务并账情况：涉及6笔记录；\n" +
                    "          10. 检查日常记账及时性情况：涉及2笔记录，总金额为566.48元；", a11font);

            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 往来款长期（大额）挂账：涉及金额共计2,132,257.05元；\n" +
                    "          2. 资产使用寿命预警：25条记录；\n" +
                    "          3. 资产价值预警：涉及2条记录，价值大于100万；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("06")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为96,527,189.43元，实际执行预算数为69,406,303.39元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 隐藏三公经费支出：涉及2条记录；\n" +
                    "          2. 超范围列支：涉及24条记录，总金额为73,459.29；\n" +
                    "          3. 广州市五区以外差旅补贴合理性核查：涉及65条记录；\n" +
                    "          4. 重复支付嫌疑：涉及3条记录，总金额为3,471.50元；\n" +
                    "          5. 基层财务并账情况：涉及9笔记录；\n" +
                    "          6. 资产录入分类校验：资产原值36,076.00元，折旧额229,034.00元；", a11font);

            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 执法用车使用预警：涉及794条记录，里程2,858,127；\n" +
                    "          2. 资产使用寿命预警：55条记录；\n" +
                    "          3. 资产价值预警：涉及2条记录，价值大于100万；\n" +
                    "          4. 检查无形资产管理情况：涉及38条记录；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("07")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为0.00元，实际执行预算数为54,050,952.30元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 无预算或超预算：列支六公经费；\n" +
                    "          2. 隐藏三公经费支出：涉及2条记录；\n" +
                    "          3. 超范围列支：涉及18条记录，总金额为93,398.36；\n" +
                    "          4. 重复支付嫌疑：涉及3条记录，总金额为4,120元；\n" +
                    "          5. 财务规则校验预警：涉及10笔记录；\n" +
                    "          6. 部门经济分类科目的其他支出占比预警：科目71010102:经济分类支出30199超过30%、科目71010102:经济分类支出30299超过30%、科目7101010101:经济分类支出30399超过30%；\n" +
                    "          7. 财务日常财务会计与预算会计基本校验：科目1011与800101余额存在差异、科目4601与6601余额存在差异；\n" +
                    "          8. 基层财务并账情况：涉及7笔记录；", a11font);


            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 往来款长期（大额）挂账：涉及金额共计1,550,377.57元；\n" +
                    "          2. 资产使用寿命预警：16条记录；\n" +
                    "          3. 资产价值预警：涉及1条记录，价值大于100万；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("08")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为49,448,336.86元，实际执行预算数为30,776,867.65元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 无预算或超预算：列支六公经费；\n" +
                    "          2. 隐藏三公经费支出：涉及2条记录；\n" +
                    "          3. 超范围列支：涉及20条记录，总金额为54,999.30\n" +
                    "          4. 广州市五区以外差旅补贴合理性核查：涉及52条记录；\n" +
                    "          5. 重复支付嫌疑：涉及3条记录，总金额为10,456元；\n" +
                    "          6. 财务规则校验预警：涉及2笔记录；\n" +
                    "          7. 部门经济分类科目的其他支出占比预警：科目71010102:经济分类支出30199超过30%、科目71010202:经济分类支出30199超过30%；\n" +
                    "          8. 财务日常财务会计与预算会计基本校验：科目1011与800101余额存在差异；\n" +
                    "          9. 基层财务并账情况：涉及6笔记录；\n" +
                    "          10. 检查固定资产报废处理情况：原值2,823,004.18元，折旧额3,082,504.18元；", a11font);

            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 往来款长期（大额）挂账：涉及金额共计162,848.63元；\n" +
                    "          2. 资产使用寿命预警：22条记录；\n" +
                    "          3. 检查无形资产管理情况：涉及6条记录；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("09")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为70,103,226.50元，实际执行预算数为59,105,605.82元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 隐藏三公经费支出：涉及1条记录；\n" +
                    "          2. 超范围列支：涉及5条记录，总金额为87,413.62；\n" +
                    "          3. 广州市五区以外差旅补贴合理性核查：涉及5条记录；\n" +
                    "          4. 重复支付嫌疑：涉及1条记录，总金额为5,000.00元；\n" +
                    "          5. 财务规则校验预警：涉及3笔记录；\n" +
                    "          6. 部门经济分类科目的其他支出占比预警：科目7101010102:经济分类支出30399超过30%、科目71010203:经济分类支出30299超过30%；\n" +
                    "          7. 财务日常财务会计与预算会计基本校验：科目4001与6001余额存在差异、科目4601与6601余额存在差异；\n" +
                    "          8. 基层财务并账情况：涉及6笔记录；", a11font);


            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 往来款长期（大额）挂账：涉及金额共计40,984,225.7元；\n" +
                    "          2. 资产使用寿命预警：6条记录；\n" +
                    "          3. 资产价值预警：涉及5条记录，价值大于100万；\n" +
                    "          4. 检查无形资产管理情况：涉及9条记录；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("10")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为0.00元，实际执行预算数为69,349,258.78元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 无预算或超预算：列支六公经费；\n" +
                    "          2. 超范围列支：涉及28条记录，总金额为32,918.98；\n" +
                    "          3. 广州市五区以外差旅补贴合理性核查：涉及5条记录；\n" +
                    "          4. 国赔发生预警：涉及6条记录，总金额为1,778,067.44元；\n" +
                    "          5. 财务规则校验预警：涉及8笔记录；\n" +
                    "          6. 部门经济分类科目的其他支出占比预警：科目71010102:经济分类支出30299超过30%、科目7101010102:经济分类支出30399超过30%、科目71010202:经济分类支出30199超过30%、科目71010202:经济分类支出30299超过30%；\n" +
                    "          7. 财务日常财务会计与预算会计基本校验：科目4001与6001余额存在差异；\n" +
                    "          8. 基层财务并账情况：涉及7笔记录；", a11font);


            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 检查无形资产管理情况：涉及117条记录；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        } else if (data.get(0).getCompanyId().equals("11")) {
            a31 = new Paragraph("（一）预算管理业务问题", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a31.setIndentationLeft(12); //设置左缩进
            a31.setIndentationRight(12); //设置右缩进
            a31.setLeading(20f); //行间距
            a31.setSpacingBefore(25f); //设置段落上空白
            a31.setSpacingAfter(10f); //设置段落下空白

            a311 = new Paragraph("          通过业务数据分析，发现预算执行差异较多：年初预算数为44,191,800.00元，实际执行预算数为34,965,339.63元。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a311.setIndentationLeft(18); //设置左缩进
            a311.setIndentationRight(12); //设置右缩进
            a311.setLeading(20f); //行间距

            a32 = new Paragraph("（二）财务收支业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a32.setIndentationLeft(12); //设置左缩进
            a32.setIndentationRight(12); //设置右缩进
            a32.setLeading(20f); //行间距
            a32.setSpacingBefore(25f); //设置段落上空白
            a32.setSpacingAfter(10f); //设置段落下空白

            a321 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 无预算或超预算：列支六公经费；\n" +
                    "          2. 隐藏三公经费支出：涉及4条记录；\n" +
                    "          3. 超范围列支：涉及13条记录，总金额为12,929.00；\n" +
                    "          4. 广州市五区以外差旅补贴合理性核查：涉及191条记录；\n" +
                    "          5. 重复支付嫌疑：涉及23条记录；\n" +
                    "          6. 财务规则校验预警：涉及1笔记录；\n" +
                    "          7. 部门经济分类科目的其他支出占比预警：涉及5笔记录\n" +
                    "          8. 财务日常财务会计与预算会计基本校验：科目4001与6001余额存在差异；\n" +
                    "          9. 基层财务并账情况：涉及6笔记录；", a11font);


            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a321.setIndentationLeft(18); //设置左缩进
            a321.setIndentationRight(12); //设置右缩进
            a321.setLeading(20f); //行间距

            a322 = new Paragraph("", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a322.setIndentationLeft(18); //设置左缩进
            a322.setIndentationRight(12); //设置右缩进
            a322.setLeading(20f); //行间距

            a33 = new Paragraph("（三）政府采购业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a33.setIndentationLeft(12); //设置左缩进
            a33.setIndentationRight(12); //设置右缩进
            a33.setLeading(20f); //行间距
            a33.setSpacingBefore(25f); //设置段落上空白
            a33.setSpacingAfter(10f); //设置段落下空白

            a331 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a331.setIndentationLeft(18); //设置左缩进
            a331.setIndentationRight(12); //设置右缩进
            a331.setLeading(20f); //行间距


            a34 = new Paragraph("（四）资产管理业务方面", a1font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a34.setIndentationLeft(12); //设置左缩进
            a34.setIndentationRight(12); //设置右缩进
            a34.setLeading(20f); //行间距
            a34.setSpacingBefore(25f); //设置段落上空白
            a34.setSpacingAfter(10f); //设置段落下空白

            a341 = new Paragraph("          通过业务系统数据分析，发现存在以下待优化问题:\n" +
                    "          1. 往来款长期（大额）挂账：涉及金额共计1,017,477.93元；\n" +
                    "          2. 资产使用寿命预警：76条记录；\n" +
                    "          3. 检查无形资产管理情况：涉及1,108条记录；", a11font);
            a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
            a341.setIndentationLeft(18); //设置左缩进
            a341.setIndentationRight(12); //设置右缩进
            a341.setLeading(20f); //行间距
        }


        Paragraph a35 = new Paragraph("（五）建设项目业务问题", a1font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a35.setIndentationLeft(12); //设置左缩进
        a35.setIndentationRight(12); //设置右缩进
        a35.setLeading(20f); //行间距
        a35.setSpacingBefore(25f); //设置段落上空白
        a35.setSpacingAfter(10f); //设置段落下空白

        Paragraph a351 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a351.setIndentationLeft(18); //设置左缩进
        a351.setIndentationRight(12); //设置右缩进
        a351.setLeading(20f); //行间距


        Paragraph a36 = new Paragraph("（六）合同管理业务问题", a1font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a36.setIndentationLeft(12); //设置左缩进
        a36.setIndentationRight(12); //设置右缩进
        a36.setLeading(20f); //行间距
        a36.setSpacingBefore(25f); //设置段落上空白
        a36.setSpacingAfter(10f); //设置段落下空白

        Paragraph a361 = new Paragraph("          通过业务系统数据分析，目前没有发现问题。\n", a11font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a361.setIndentationLeft(18); //设置左缩进
        a361.setIndentationRight(12); //设置右缩进
        a361.setLeading(20f); //行间距


        Paragraph a37 = new Paragraph("（七）其他情况说明", a1font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a37.setIndentationLeft(12); //设置左缩进
        a37.setIndentationRight(12); //设置右缩进
        a37.setLeading(20f); //行间距
        a37.setSpacingBefore(25f); //设置段落上空白
        a37.setSpacingAfter(10f); //设置段落下空白

        Paragraph a371 = new Paragraph("          本次多系统数据对比进行时，发现部分数据链出现关联性断开，如差旅费管理情况，出差人在内控系统填报系统时，报销单据缺少车辆信息，与穗检出行管理系统数据、执行域数据无法形成数据比对。建议在单位内部相关系统建设时，考虑系统间的关联性设置，形成更加有效的监督机制。", a11font);
        a2.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        a371.setIndentationLeft(18); //设置左缩进
        a371.setIndentationRight(12); //设置右缩进
        a371.setLeading(20f); //行间距

        document.add(a3);
        document.add(a31);
        document.add(a311);

        document.add(a32);
        document.add(a321);
        document.add(a322);

        document.add(a33);
        document.add(a331);

        document.add(a34);
        document.add(a341);

        document.add(a35);
        document.add(a351);

        document.add(a36);
        document.add(a361);

        document.add(a37);
        document.add(a371);

        document.newPage();

        // 目录
        Paragraph attach1 = new Paragraph("附件一：", a1font);
        attach1.setAlignment(0); //设置文字居中 0靠左   1，居中     2，靠右
        attach1.setIndentationLeft(12); //设置左缩进
        attach1.setIndentationRight(12); //设置右缩进
        attach1.setLeading(20f); //行间距
        attach1.setSpacingBefore(15f); //设置段落上空白
        attach1.setSpacingAfter(15f); //设置段落下空白

        PdfPTable table = createTable(new float[]{10, 60, 80, 20});
        table.addCell(createCell("序号", headfont, Element.ALIGN_CENTER));
        table.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table.addCell(createCell("指标", headfont, Element.ALIGN_CENTER));
        table.addCell(createCell("整改情况", headfont, Element.ALIGN_CENTER));
        if (data != null && data.size() > 0) {
            for (int i = 0; i < data.size(); i++) {
                table.addCell(createCell(String.valueOf(i + 1), textfont, Element.ALIGN_CENTER));
                table.addCell(createCell(data.get(i).getCompanyName(), textfont, Element.ALIGN_LEFT));
                table.addCell(createCell(data.get(i).getModelName(), textfont, Element.ALIGN_LEFT));
                table.addCell(createCell(DealFlags.valueOfEnum(data.get(i).getDealFlag()).getText(), textfont, Element.ALIGN_CENTER));
            }
        }
        document.add(attach1);
        document.add(table);
        document.newPage();

        int page = 1;
        // 内容
        if (data != null && data.size() > 0) {
            String currentCategoryName = "";
            for (AuditModelWarn item : data) {
                //页码
                Paragraph paragraphPage = new Paragraph("第" + page++ + "页", keyfont);
                paragraphPage.setAlignment(2); //设置文字居中 0靠左   1，居中     2，靠右
                paragraphPage.setIndentationLeft(0); //设置左缩进
                paragraphPage.setIndentationRight(16); //设置右缩进
                paragraphPage.setLeading(0f); //行间距
                //paragraphTitle.setSpacingBefore(45f); //设置段落上空白
                paragraphPage.setSpacingAfter(0f); //设置段落下空白
                document.add(paragraphPage);

                //组装指标结果
                createCommonTable(document, item, fileuploadPath);

                document.newPage();
            }
        }
    }

    //1 以前年度专项结余资金未上缴
    public void createAuditModel1(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 160, 80, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("科目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("余额", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_1.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_1.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_1.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmCode() + "_" + rowData.getKjkmName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getYe()).toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //2 党费购置资产规范性
    public void createAuditModel2(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 160, 80, 60, 100, 80, 160, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("科目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("期间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_2.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_2.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_2.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getKjqj().toString(), textfont));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJ().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getD().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //3 往来款长期（大额）挂账
    public void createAuditModel3(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 170, 170, 70, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("科目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("往来单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("余额", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_3.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_3.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_3.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getWldxCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getYe().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //4 隐瞒、截留、滞留、挪用、坐支非税收入-1
    public void createAuditModel4(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 150, 170, 110, 100, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计科目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("比例", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_4.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_4.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_4.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getJ()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getD()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getScale()).toString(), textfont));
        }
        document.add(table2);
    }

    //5 隐瞒、截留、滞留、挪用、坐支非税收入-2
    public void createAuditModel5(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 170, 110, 100, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("比例", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_5.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_5.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_5.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJ().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getD().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getScale() == null ? "" : rowData.getScale().toString(), textfont));
        }
        document.add(table2);
    }

    //6 隐瞒、截留、滞留、挪用、坐支非税收入-3
    public void createAuditModel6(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 170, 110, 100, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计科目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("余额", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_6.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_6.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_6.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJ().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getD().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getYe().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //7 未严格执行公务卡结算规定
    public void createAuditModel7(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 170, 70, 110, 100, 180, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计科目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
//        table2.addCell(createCell("期间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_7.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_7.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_7.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
//          table2.addCell(createCell(rowData.getKjqj() == null ? "" : rowData.getKjqj().toString(), textfont));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJ().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getD().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //8 无预算或超预算：列支六公经费
    public void createAuditModel8(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 120, 120, 120, 120, 120, 120, 120, 120, 120});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("公务接待费(预算)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("公务接待费(执行)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("公务接待费(核算)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("公务用车购置及运行维护费(预算)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("公务用车购置及运行维护费(执行)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("公务用车购置及运行维护费(核算)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("因公出国（境）费(预算)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("因公出国（境）费(执行)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("因公出国（境）费(核算)", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_8.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_8.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_8.AuditModelStep2 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getTotal30217()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getExcute30217()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getPz30217()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getTotal30231()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getExcute30231()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getPz30231()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getTotal30212()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getExcute30212()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getPz30212()).toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //9 违反四风举办庆典、论坛、展会等
    public void createAuditModel9(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 70, 150, 150, 80, 160, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("期间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计科目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("经济分类", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_9.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_9.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_9.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getKjqj().toString(), textfont));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJjflCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getJ()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getD()).toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //10 以参加培训、会议名义，组织公款旅游
    public void createAuditModel10(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 110, 100, 180, 160, 180, 180, 70});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计科目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("经济分类", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("收款人名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("是否异常", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_10.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_10.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_10.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJjflCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getSkrName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell((rowData.getFlag() != null && rowData.getFlag().equals(1)) ? "是" : "否", textfont));
        }
        document.add(table2);
    }

    //12 在建工程未结转固定资产
    public void createAuditModel12(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 180, 180, 160});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计科目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("项目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("变动比例", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_12.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_12.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_12.AuditModelStep2 rowData : t.getStep2List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getXmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getScale().toString(), textfont));
        }
        document.add(table2);
    }

    //13 隐藏三公经费支出
    public void createAuditModel13(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 110, 100, 180, 160, 180, 180});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计科目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("经济分类", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("收款人名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_13.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_13.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_13.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJjflCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getSkrName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //14 违规使用非本单位的车辆
    public void createAuditModel14(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 110, 100, 230, 80});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("是否异常", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_14.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_14.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_14.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell((rowData.getFlag() != null && rowData.getFlag().equals(1)) ? "是" : "否", textfont));
        }
        document.add(table2);
    }

    //15 预算编制不合理
    public void createAuditModel15(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{80, 80, 110, 110, 110, 80, 110, 110, 80, 80});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("预算单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("主管部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("项目类别", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("一级项目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("一级项目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("指标金额", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("支出数", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("比例", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("是否异常", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_15.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_15.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_15.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getXmCategoryName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getXm1Code(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getXm1Name(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZbje()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZcs()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZbjhjy()).toString(), textfont));
            table2.addCell(createCell((rowData.getFlag() != null && rowData.getFlag().equals(1)) ? "是" : "否", textfont));
        }
        document.add(table2);
    }

    //16 预算编制不完整
    public void createAuditModel16(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 180, 110, 110, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("科目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年初预算", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("账务记账收入", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("预算执行", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("差异", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_16.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_16.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        String flagStr = "";
        for (com.open.capacity.finance.dto.audit_model_16.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getBudgetTotalMoney().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getD().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getBudgetExcuteMoney().toString(), textfont, Element.ALIGN_RIGHT));

//            table2.addCell(createCell("351410384.53", textfont, Element.ALIGN_RIGHT));
            if (rowData.getFlag().equals(0)) {
                flagStr = "";
            } else if (rowData.getFlag().equals(1)) {
                flagStr = "有差异";
            } else if (rowData.getFlag().equals(2)) {
                flagStr = "有差异";
            }
            table2.addCell(createCell(flagStr, textfont));
        }
        document.add(table2);
    }

    //17 超范围列支
    public void createAuditModel17(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 160, 160, 80, 60, 80, 160, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("科目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("经济分类", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("期间", headfont, Element.ALIGN_CENTER));
//        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_17.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_17.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_17.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJjflCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getKjqj().toString(), textfont));
//          table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJ().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getD().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //19 会议未在定点举办
    public void createAuditModel19(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 180, 200, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("经济科目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("收款单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("酒店预警", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("金额", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_19.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_19.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_19.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJjkmCodeAndName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getSkrName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell((rowData.getFlag() != null && rowData.equals(2)) ? "红色预警" : "黄色预警", textfont));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getAmount()).toString(), textfont, Element.ALIGN_RIGHT));

        }
        document.add(table2);
    }

    //20 项目支出执行率偏低
    public void createAuditModel20(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{80, 80, 110, 110, 110, 80, 110, 110, 80});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("预算单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("主管部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("项目类别", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("一级项目", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("一级项目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("指标金额", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("支出数", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("比例", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_20.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_20.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_20.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getXmCategoryName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getXm1Code(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getXm1Name(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZbje()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZcs()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZbjhjy()).toString(), textfont));
        }
        document.add(table2);
    }

    //21 年底突击花钱
    public void createAuditModel21(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 110, 110, 110, 80, 110, 80, 110, 80, 80, 80});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("指标摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("指标金额", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("支出数", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("总比例%", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("第四季度支出", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("第四季度%", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("最后两月支出", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("最后两月%", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("最后两月单位总支出%", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("是否异常", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_21.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_21.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_21.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getZbzy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZbje()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZcs()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getZcjd().toString(), textfont));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZcs1()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZcjd1()).toString(), textfont));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZcs2()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZcjd2()).toString(), textfont));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getZcjd3()).toString(), textfont));
            table2.addCell(createCell((rowData.getFlag() != null && rowData.getFlag().equals(1)) ? "是" : "否", textfont));
        }
        document.add(table2);
    }

    //24 超标准发放节日慰问品
    public void createAuditModel24(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 160, 80, 100, 80, 160, 110, 110, 80, 80});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("科目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("占比", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("是否异常", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_24.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_24.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_24.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJ().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getD().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getScale() == null ? "" : rowData.getScale().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getFlag() == null ? "" : (rowData.getFlag().equals(1) ? "是" : "否"), textfont));
        }
        document.add(table2);
    }

    //25 办公设备数量（复印机）的合理性
    public void createAuditModel25(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 110, 110, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产类别", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("设备数量", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("人员数量", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("人均数量", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_25.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_25.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_25.AuditModelStep2 rowData : t.getStep2List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getCategoryName(), textfont));
            table2.addCell(createCell(rowData.getDeviceCount().toString(), textfont));
            table2.addCell(createCell(rowData.getPersonCount() == null ? "" : rowData.getPersonCount().toString(), textfont));
            table2.addCell(createCell(rowData.getPerDeviceCount() == null ? "" : rowData.getPerDeviceCount().toString(), textfont));
        }
        document.add(table2);
    }

    //26 部门决算报表与行政账的账表一致性
    public void createAuditModel26(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 110, 110, 110, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警指标", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年初数(决算)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年初数(余额表)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年末数(决算)", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年末数(余额表)", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_26.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_26.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.SourceZcfzbErrorDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getErrorMsg(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getNcye1().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getNcye2().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getYe1().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getYe2().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //27 固定资产、无形资产账一致性
    public void createAuditModel27(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 110, 110, 110, 80});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产类型", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产原值", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("财务总额", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("是否匹配", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_27.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_27.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        String assetType = "";
        for (com.open.capacity.finance.dto.audit_model_27.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            if (rowData.getAssetType().equals("fixed")) {
                assetType = "固定资产";
            } else {
                assetType = "无形资产";
            }
            table2.addCell(createCell(assetType, textfont));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getAssetMoney()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(BigDecimalUtil.getData(rowData.getFinanceYe()).toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getMatch() ? "是" : "否", textfont));
        }
        document.add(table2);
    }

    //28 党费利息收入合规性（司机
    public void createAuditModel28(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 160, 80, 60, 100, 80, 160, 110, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("科目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("会计年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("期间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("借", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("贷", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_28.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_28.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_28.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getKjqj().toString(), textfont));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJ().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getD().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //29 广州市五区以外差旅补贴真实性核查（司机
    public void createAuditModel29(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{160, 60, 120, 80, 220, 200, 100, 80, 110, 120, 120, 120, 100});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销人", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销事项", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("出差人", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("驾驶员", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("车牌号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销时间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("目的地", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("出发时间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("交车时间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销金额", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_30.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_30.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.nk.dto.NKReceiptTravelDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getNameorganization(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getYearly().toString(), textfont));
            table2.addCell(createCell(rowData.getNamedepartment(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getPaymentperson(), textfont));
            table2.addCell(createCell(rowData.getContent(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getPerson(), textfont));
            table2.addCell(createCell(rowData.getDriver(), textfont));
            table2.addCell(createCell(rowData.getCph(), textfont));
            table2.addCell(createCell(DateUtil.format(rowData.getCreatedate()), textfont));
            table2.addCell(createCell(rowData.getStartcity(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(DateUtil.format(rowData.getStartdate()), textfont));
            table2.addCell(createCell(DateUtil.format(rowData.getLeavedate()), textfont));
            table2.addCell(createCell(rowData.getAmount10().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //30 广州市五区以外差旅补贴合理性核查
    public void createAuditModel30(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{160, 60, 120, 80, 220, 200, 100, 80, 110, 120, 120, 120, 100});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销人", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销事项", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("出差人", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("驾驶员", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("车牌号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销时间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("目的地", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("出发时间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("交车时间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销金额", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_30.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_30.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.nk.dto.NKReceiptTravelDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getNameorganization(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getYearly().toString(), textfont));
            table2.addCell(createCell(rowData.getNamedepartment(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getPaymentperson(), textfont));
            table2.addCell(createCell(rowData.getContent(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getPerson(), textfont));
            table2.addCell(createCell(rowData.getDriver(), textfont));
            table2.addCell(createCell(rowData.getCph(), textfont));
            table2.addCell(createCell(DateUtil.format(rowData.getCreatedate()), textfont));
            table2.addCell(createCell(rowData.getStartcity(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(DateUtil.format(rowData.getStartdate()), textfont));
            table2.addCell(createCell(DateUtil.format(rowData.getLeavedate()), textfont));
            table2.addCell(createCell(rowData.getAmount10().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //31 公车运维费用合理性预警
    public void createAuditModel31(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 180, 80, 60, 120});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("月份", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("用车公里数", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_31.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_31.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_31.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getMonth().toString(), textfont));
            table2.addCell(createCell(rowData.getMileageUse() == null ? "" : rowData.getMileageUse().toString(), textfont));
        }
        document.add(table2);
    }

    //34 部门人均费用排名
    public void createAuditModel34(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 180, 120, 120, 120});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销额（元）", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("部门人数（人）", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("人均报销（元/人）", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_34.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_34.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_34.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getAmount().toString(), textfont));
            table2.addCell(createCell(rowData.getPersonCount().toString(), textfont));
            table2.addCell(createCell(rowData.getAverage().toString(), textfont));
        }
        document.add(table2);
    }

    //35 均案费用排名
    public void createAuditModel35(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 180, 120, 120, 120});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("报销额（元）", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("案件数（件）", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("平均报销（元/件）", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_35.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_35.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_35.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getAmount().toString(), textfont));
            table2.addCell(createCell(rowData.getAjCount().toString(), textfont));
            table2.addCell(createCell(rowData.getAverage().toString(), textfont));
        }
        document.add(table2);
    }

    //36 闲置资产
    public void createAuditModel36(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{50, 180, 180, 180, 120, 120, 150, 120, 200});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("卡片序号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产类别", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("卡片序号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("所属部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("使用人", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("存放地点", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("备注", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_36.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_36.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        int count = 0;
        int i = 1;
        for (com.open.capacity.finance.dto.audit_model_36.AuditModelStep1 rowData : t.getData()) {
            if (count++ > 100) {
                break;
            }
            table2.addCell(createCell(String.valueOf(i++), textfont));
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getCategoryName(), textfont));
            table2.addCell(createCell(rowData.getAssetName(), textfont));
            table2.addCell(createCell(rowData.getAssetCode(), textfont));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont));
            table2.addCell(createCell(rowData.getUserName(), textfont));
            table2.addCell(createCell(rowData.getLocation(), textfont));
            table2.addCell(createCell(rowData.getRemark(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //37 国家赔偿
    public void createAuditModel37(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 110, 140, 150, 160, 110, 100, 120});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("业务单号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("金额", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("经济分类", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("用途", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("收款人", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_37.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_37.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_37.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getBusinessCode(), textfont));
            table2.addCell(createCell(rowData.getAmount().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getJjkmName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getSkrName(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //38 执法用车使用预警
    public void createAuditModel38(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 70, 130, 100, 160, 160, 140, 140, 100, 100, 100, 100, 200});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("使用人", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("出发地", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("目的地", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("用车时间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("交车时间", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("车牌号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("驾驶员", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("用车里程", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("用车类型", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("用车备注", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_38.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_38.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_38.AuditModelStep1 rowData : t.getData()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getUserName(), textfont));
            table2.addCell(createCell(rowData.getPlaceStart(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getPlaceEnd(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getTimeStart(), textfont));
            table2.addCell(createCell(rowData.getTimeEnd(), textfont));
            table2.addCell(createCell(rowData.getNumber(), textfont));
            table2.addCell(createCell(rowData.getDriver(), textfont));
            table2.addCell(createCell(rowData.getMileageUse().toString(), textfont));
            table2.addCell(createCell(rowData.getDescriptionType(), textfont));
            table2.addCell(createCell(rowData.getUseDescription(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //39 资产使用寿命预警
    public void createAuditModel39(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        com.open.capacity.finance.dto.audit_model_39.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_39.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }

        List<AuditModelStep1> collect1 = t.getData().stream().filter(c -> c.getUseYear().compareTo(20) > 0).collect(Collectors.toList());
        List<AuditModelStep1> collect2 = t.getData().stream().filter(c -> c.getUseYear().compareTo(15) > 0 && c.getUseYear().compareTo(20) <= 0).collect(Collectors.toList());
        List<AuditModelStep1> collect3 = t.getData().stream().filter(c -> c.getUseYear().compareTo(15) < 0).collect(Collectors.toList());
        String tips = "合计" + t.getData().size() + "条记录，其中";
        if (CollectionUtils.isNotEmpty(collect1)) {
            tips += "20年以上的有" + collect1.size() + "条；";
        }
        if (CollectionUtils.isNotEmpty(collect2)) {
            tips += "15-20年的有" + collect2.size() + "条；";
        }
        document.add(new Paragraph(tips, iTextPDFUtil.getColorFont(BaseColor.BLACK, 10, "宋体")));

        if (CollectionUtils.isNotEmpty(collect1)) {
            PdfPTable table2 = createTable(new float[]{50, 180, 180, 180, 120, 100, 80, 150, 120, 200});
            table2.setSpacingBefore(8f);//表格前间距
            table2.addCell(createCell("序号", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("资产类别", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("资产名称", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("入账日期", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("正常年限", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("年限预警", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("卡片序号", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("存放地点", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("备注", headfont, Element.ALIGN_CENTER));

            int i = 1;
            for (com.open.capacity.finance.dto.audit_model_39.AuditModelStep1 rowData : collect1) {
                table2.addCell(createCell(String.valueOf(i++), textfont));
                table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
                table2.addCell(createCell(rowData.getCategoryName(), textfont));
                table2.addCell(createCell(rowData.getAssetName(), textfont));
                table2.addCell(createCell(DateUtil.formatDate(rowData.getAccountDate()), textfont));
                String nomalYear = "6-10年";
                if (rowData.getCategoryName().startsWith("[A02")) {
                    nomalYear = "6-10年";
                } else if (rowData.getCategoryName().startsWith("[A05")) {
                    nomalYear = "15年";
                }
                table2.addCell(createCell(nomalYear, textfont));
                table2.addCell(createCell(String.valueOf(rowData.getUseYear()), textfont));
                table2.addCell(createCell(rowData.getAssetCode(), textfont));
                table2.addCell(createCell(rowData.getLocation(), textfont));
                table2.addCell(createCell(rowData.getRemark(), textfont, Element.ALIGN_LEFT));
            }
            document.add(new Paragraph("【使用年限20年以上】", iTextPDFUtil.getColorFont(BaseColor.BLACK, 10, "宋体")));
            document.add(table2);
        }

        if (CollectionUtils.isNotEmpty(collect2)) {
            PdfPTable table2 = createTable(new float[]{50, 180, 180, 180, 120, 100, 80, 150, 120, 200});
            table2.setSpacingBefore(8f);//表格前间距
            table2.addCell(createCell("序号", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("资产类别", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("资产名称", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("入账日期", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("正常年限", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("年限预警", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("卡片序号", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("存放地点", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("备注", headfont, Element.ALIGN_CENTER));

            int i = 1;
            for (com.open.capacity.finance.dto.audit_model_39.AuditModelStep1 rowData : collect2) {
                table2.addCell(createCell(String.valueOf(i++), textfont));
                table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
                table2.addCell(createCell(rowData.getCategoryName(), textfont));
                table2.addCell(createCell(rowData.getAssetName(), textfont));
                table2.addCell(createCell(DateUtil.formatDate(rowData.getAccountDate()), textfont));
                String nomalYear = "6-10年";
                if (rowData.getCategoryName().startsWith("[A02")) {
                    nomalYear = "6-10年";
                } else if (rowData.getCategoryName().startsWith("[A05")) {
                    nomalYear = "15年";
                }
                table2.addCell(createCell(nomalYear, textfont));
                table2.addCell(createCell(String.valueOf(rowData.getUseYear()), textfont));
                table2.addCell(createCell(rowData.getAssetCode(), textfont));
                table2.addCell(createCell(rowData.getLocation(), textfont));
                table2.addCell(createCell(rowData.getRemark(), textfont, Element.ALIGN_LEFT));
            }
            document.add(new Paragraph("【使用年限在15-20年之间】", iTextPDFUtil.getColorFont(BaseColor.BLACK, 10, "宋体")));
            document.add(table2);
        }


        if (CollectionUtils.isNotEmpty(collect3)) {
            PdfPTable table2 = createTable(new float[]{50, 180, 180, 180, 120, 100, 80, 150, 120, 200});
            table2.setSpacingBefore(8f);//表格前间距
            table2.addCell(createCell("序号", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("资产类别", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("资产名称", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("入账日期", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("正常年限", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("年限预警", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("卡片序号", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("存放地点", headfont, Element.ALIGN_CENTER));
            table2.addCell(createCell("备注", headfont, Element.ALIGN_CENTER));

            int i = 1;
            for (com.open.capacity.finance.dto.audit_model_39.AuditModelStep1 rowData : collect3) {
                table2.addCell(createCell(String.valueOf(i++), textfont));
                table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
                table2.addCell(createCell(rowData.getCategoryName(), textfont));
                table2.addCell(createCell(rowData.getAssetName(), textfont));
                table2.addCell(createCell(DateUtil.formatDate(rowData.getAccountDate()), textfont));
                String nomalYear = "6-10年";
                if (rowData.getCategoryName().startsWith("[A02")) {
                    nomalYear = "6-10年";
                } else if (rowData.getCategoryName().startsWith("[A05")) {
                    nomalYear = "15年";
                }
                table2.addCell(createCell(nomalYear, textfont));
                table2.addCell(createCell(String.valueOf(rowData.getUseYear()), textfont));
                table2.addCell(createCell(rowData.getAssetCode(), textfont));
                table2.addCell(createCell(rowData.getLocation(), textfont));
                table2.addCell(createCell(rowData.getRemark(), textfont, Element.ALIGN_LEFT));
            }
            document.add(new Paragraph("【使用年限在8-15年之间】", iTextPDFUtil.getColorFont(BaseColor.BLACK, 10, "宋体")));
            document.add(table2);
        }
    }

    //40 资产价值预警
    public void createAuditModel40(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{50,180, 180, 180, 120, 80, 150, 120, 200});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("序号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产类别", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("卡片序号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("所属部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("存放地点", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("备注", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_40.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_40.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        String errorMsg = "";
        int i = 1;
        for (com.open.capacity.finance.dto.audit_model_40.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(String.valueOf(i++), textfont));
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getCategoryName(), textfont));
            table2.addCell(createCell(rowData.getAssetName(), textfont));
            table2.addCell(createCell(rowData.getAssetCode(), textfont));

            if (rowData.getType() == 1) {
                errorMsg = "价值大于100万";
            } else if (rowData.getType() == 2) {
                errorMsg = "价值大于300万";
            }
            table2.addCell(createCell(errorMsg, textfont));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont));
            table2.addCell(createCell(rowData.getLocation(), textfont));
            table2.addCell(createCell(rowData.getRemark(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //41 财务规则校验预警
    public void createAuditModel41(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 60, 80, 400});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警内容", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_41.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_41.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        String errorMsg = "";
        for (SourcePzErrorDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            if (rowData.getErrorCode() == 1) {
                errorMsg = "余额不匹配";
            } else if (rowData.getErrorCode() == 2) {
                errorMsg = "余额负数";
            } else if (rowData.getErrorCode() == 3) {
                errorMsg = "期初余额负数";
            } else if (rowData.getErrorCode() == 4) {
                errorMsg = "支出经济分类检查";
            } else if (rowData.getErrorCode() == 5) {
                errorMsg = "项目检查";
            } else if (rowData.getErrorCode() == 6) {
                errorMsg = "经济分类支出占比超过30%";
            }
            table2.addCell(createCell(errorMsg, textfont));
            table2.addCell(createCell(rowData.getErrorMsg(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //43 重复支付嫌疑
    public void createAuditModel43(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{160, 50, 100, 200, 200, 110, 250});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("单据编号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("收款人", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("金额", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_43.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (SourceBaseBusinesspay rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getBusinessCode(), textfont));
            table2.addCell(createCell(rowData.getSkrName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(StringUtil.fmtMicrometer(rowData.getAmount().toString()), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //44 检查无形资产管理情况
    public void createAuditModel44(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{50,180, 180, 180, 120, 120, 150, 120, 200});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("序号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产类别", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("卡片序号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("所属部门", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("使用人", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("存放地点", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("备注", headfont, Element.ALIGN_CENTER));

        com.open.capacity.finance.dto.audit_model_44.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_44.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        int count = 0;
        int i = 1;
        for (com.open.capacity.finance.dto.audit_model_44.AuditModelStep1 rowData : t.getData()) {
            if (count++ > 100) {
                break;
            }
            table2.addCell(createCell(String.valueOf(i++), textfont));
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getCategoryName(), textfont));
            table2.addCell(createCell(rowData.getAssetName(), textfont));
            table2.addCell(createCell(rowData.getAssetCode(), textfont));
            table2.addCell(createCell(rowData.getDepartmentName(), textfont));
            table2.addCell(createCell(rowData.getUserName(), textfont));
            table2.addCell(createCell(rowData.getLocation(), textfont));
            table2.addCell(createCell(rowData.getRemark(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }


    //45 检查出70010101/70010201,30199、30299、30399、31099、30999等占301、302、303、309、310汇总的30%的预警
    public void createAuditModel45(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 60, 400});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警内容", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_41.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_41.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (SourcePzErrorDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getErrorMsg(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //46  4001对应6001,4601对应6601,4609对应6609科目，收入类科目必须相等。
    public void createAuditModel46(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 400});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警内容", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_41.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_41.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (SourcePzErrorDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getErrorMsg(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //47  1011,80010101科目余额必须为零。
    public void createAuditModel47(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 400});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警内容", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_41.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_41.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (SourcePzErrorDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getErrorMsg(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //48  4001,4601 6601 6609 8201 必须有发生额
    public void createAuditModel48(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 400});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警内容", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_41.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_41.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (SourcePzErrorDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getErrorMsg(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }


    //49  检查4601必须要有发生额。检查基础检察院有没有合并账务。
    public void createAuditModel49(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 80, 400});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("年度", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("告警内容", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_41.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_41.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (SourcePzErrorDto rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjnd().toString(), textfont));
            table2.addCell(createCell(rowData.getErrorMsg(), textfont, Element.ALIGN_LEFT));
        }
        document.add(table2);
    }

    //50 检查100201基本户科目有没有发生额，预警基层检察院饭堂收入应该纳入单位监管，杜绝坐支现金。
    public void createAuditModel50(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{50, 180, 160, 100, 80, 160, 110});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("序号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("科目名称", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证日期", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("凭证号", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("摘要", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("金额", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_50.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_50.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        int _sort = 1;
        for (com.open.capacity.finance.entity.SourcePz rowData : t.getStep1List()) {
            table2.addCell(createCell(String.valueOf(_sort++), textfont));
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getKjkmName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getPzrq(), textfont));
            table2.addCell(createCell(rowData.getPzh(), textfont));
            table2.addCell(createCell(rowData.getZy(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getJ().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //51 固定资产录入分类校验：用1601固定资产辅助分类的余额减去1602的余额
    public void createAuditModel51(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 160, 160});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产原值", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产折旧", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_51.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_51.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_51.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getAssetMoney().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getDepreciationMoney().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //52  固定资产折旧校验：用1602的贷方累计发生额减去5001的固定资产折旧借方累计数为0，不为0会出现计提数据有误，或者入账方式有问题。
    public void createAuditModel52(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 160, 160});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产1602", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产5001", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_51.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_51.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_51.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getDepreciationMoney().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getAssetMoney().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //55  检查固定资产报废处理情况：一是1601的贷方累计发生数应该等于1602的借方累计发生数+资产处置费用
    public void createAuditModel55(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        PdfPTable table2 = createTable(new float[]{180, 160, 160, 160});
        table2.setSpacingBefore(8f);//表格前间距
        table2.addCell(createCell("单位", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产原值", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("资产折旧", headfont, Element.ALIGN_CENTER));
        table2.addCell(createCell("处置费用", headfont, Element.ALIGN_CENTER));
        com.open.capacity.finance.dto.audit_model_55.AuditModelResult t = null;
        try {
            String json = FileUtil.readTxtToJson(fileuploadPath + item.getResultUrl());
            t = JSONObject.parseObject(json, new TypeReference<com.open.capacity.finance.dto.audit_model_55.AuditModelResult>() {
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        for (com.open.capacity.finance.dto.audit_model_55.AuditModelStep1 rowData : t.getStep1List()) {
            table2.addCell(createCell(rowData.getCompanyName(), textfont, Element.ALIGN_LEFT));
            table2.addCell(createCell(rowData.getAssetMoney().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getDepreciationMoney().toString(), textfont, Element.ALIGN_RIGHT));
            table2.addCell(createCell(rowData.getCostMoney().toString(), textfont, Element.ALIGN_RIGHT));
        }
        document.add(table2);
    }

    //组装每个指标
    public void createCommonTable(Document document, AuditModelWarn item, String fileuploadPath) throws DocumentException {
        // 总分类账
        Paragraph paragraphTitle = new Paragraph(item.getCategoryName(), titlefont);
        paragraphTitle.setAlignment(1); //设置文字居中 0靠左   1，居中     2，靠右
        paragraphTitle.setIndentationLeft(12); //设置左缩进
        paragraphTitle.setIndentationRight(12); //设置右缩进
        paragraphTitle.setLeading(20f); //行间距
        //paragraphTitle.setSpacingBefore(45f); //设置段落上空白
        paragraphTitle.setSpacingAfter(30f); //设置段落下空白
        document.add(paragraphTitle);
        document.add(new Paragraph("指标：" + item.getModelName(), iTextPDFUtil.getColorFont(BaseColor.BLACK, 10, "宋体")));

        switch (item.getModelId()) {
            case "1":
                createAuditModel1(document, item, fileuploadPath);
                break;
            case "2":
                createAuditModel2(document, item, fileuploadPath);
                break;
            case "3":
                createAuditModel3(document, item, fileuploadPath);
                break;
            case "4":
                createAuditModel4(document, item, fileuploadPath);
                break;
            case "5":
                createAuditModel5(document, item, fileuploadPath);
                break;
            case "6":
                createAuditModel6(document, item, fileuploadPath);
                break;
            case "7":
                createAuditModel7(document, item, fileuploadPath);
                break;
            case "8":
                createAuditModel8(document, item, fileuploadPath);
                break;
            case "9":
                createAuditModel9(document, item, fileuploadPath);
                break;
            case "10":
                createAuditModel10(document, item, fileuploadPath);
                break;
            case "12":
                createAuditModel12(document, item, fileuploadPath);
                break;
            case "13":
                createAuditModel13(document, item, fileuploadPath);
                break;
            case "14":
                createAuditModel14(document, item, fileuploadPath);
                break;
            case "15":
                createAuditModel15(document, item, fileuploadPath);
                break;
            case "16":
                createAuditModel16(document, item, fileuploadPath);
                break;
            case "17":
                createAuditModel17(document, item, fileuploadPath);
                break;
            case "19":
                createAuditModel19(document, item, fileuploadPath);
                break;
            case "20":
                createAuditModel20(document, item, fileuploadPath);
                break;
            case "21":
                createAuditModel21(document, item, fileuploadPath);
                break;
            case "24":
                createAuditModel24(document, item, fileuploadPath);
                break;
            case "25":
                createAuditModel25(document, item, fileuploadPath);
                break;
            case "26":
                createAuditModel26(document, item, fileuploadPath);
                break;
            case "27":
                createAuditModel27(document, item, fileuploadPath);
                break;
            case "28":
                createAuditModel28(document, item, fileuploadPath);
                break;
            case "29":
                createAuditModel29(document, item, fileuploadPath);
                break;
            case "30":
                createAuditModel30(document, item, fileuploadPath);
                break;
//            case "31":
//                createAuditModel31(document, item, fileuploadPath);
//                break;
            case "34":
                createAuditModel34(document, item, fileuploadPath);
                break;
            case "35":
                createAuditModel35(document, item, fileuploadPath);
                break;
            case "36":
                createAuditModel36(document, item, fileuploadPath);
                break;
            case "37":
                createAuditModel37(document, item, fileuploadPath);
                break;
            case "38":
                createAuditModel38(document, item, fileuploadPath);
                break;
            case "39":
                createAuditModel39(document, item, fileuploadPath);
                break;
            case "40":
                createAuditModel40(document, item, fileuploadPath);
                break;
            case "41":
                createAuditModel41(document, item, fileuploadPath);
                break;
            case "43":
                createAuditModel43(document, item, fileuploadPath);
                break;
            case "44":
                createAuditModel44(document, item, fileuploadPath);
                break;
            case "45":
                createAuditModel45(document, item, fileuploadPath);
                break;
            case "46":
                createAuditModel46(document, item, fileuploadPath);
                break;
//            case "47":
//                createAuditModel47(document, item, fileuploadPath);
            case "48":
                createAuditModel48(document, item, fileuploadPath);
                break;
//            case "49":
//                createAuditModel49(document, item, fileuploadPath);
//                break;
            case "50":
                createAuditModel50(document, item, fileuploadPath);
                break;
            case "51":
                createAuditModel51(document, item, fileuploadPath);
                break;
            case "52":
                createAuditModel52(document, item, fileuploadPath);
                break;
            case "55":
                createAuditModel55(document, item, fileuploadPath);
                break;
        }
        document.add(new Paragraph("审计目标：" + item.getAuditPurpose(), iTextPDFUtil.getColorFont(BaseColor.GRAY, 8, "宋体")));
        document.add(new Paragraph("审计方法：" + item.getAuditMethod(), iTextPDFUtil.getColorFont(BaseColor.GRAY, 8, "宋体")));

    }

/**------------------------创建表格单元格的方法start----------------------------*/
    /**
     * 创建单元格(指定字体)
     *
     * @param value
     * @param font
     * @return
     */
    public PdfPCell createCell(String value, Font font) {
        PdfPCell cell = new PdfPCell();
        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
        cell.setPhrase(new Phrase(value, font));
        cell.setPaddingBottom(5f);
        cell.setPaddingTop(5f);
        return cell;
    }

    /**
     * 创建单元格（指定字体、水平..）
     *
     * @param value
     * @param font
     * @param align
     * @return
     */
    public PdfPCell createCell(String value, Font font, int align) {
        PdfPCell cell = new PdfPCell();
        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
        cell.setHorizontalAlignment(align);
        cell.setPhrase(new Phrase(value, font));
        cell.setPaddingBottom(5f);
        cell.setPaddingTop(5f);
        return cell;
    }

    /**
     * 创建单元格（指定字体、水平居..、单元格跨x列合并）
     *
     * @param value
     * @param font
     * @param align
     * @param colspan
     * @return
     */
    public PdfPCell createCell(String value, Font font, int align, int colspan) {
        PdfPCell cell = new PdfPCell();
        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
        cell.setHorizontalAlignment(align);
        cell.setColspan(colspan);
        cell.setPhrase(new Phrase(value, font));
        return cell;
    }

    /**
     * 创建单元格（指定字体、水平居..、单元格跨x列合并、设置单元格内边距）
     *
     * @param value
     * @param font
     * @param align
     * @param colspan
     * @param boderFlag
     * @return
     */
    public PdfPCell createCell(String value, Font font, int align, int colspan, boolean boderFlag) {
        PdfPCell cell = new PdfPCell();
        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
        cell.setHorizontalAlignment(align);
        cell.setColspan(colspan);
        cell.setPhrase(new Phrase(value, font));
        cell.setPadding(3.0f);
        if (!boderFlag) {
            cell.setBorder(0);
            cell.setPaddingTop(15.0f);
            cell.setPaddingBottom(8.0f);
        } else if (boderFlag) {
            cell.setBorder(0);
            cell.setPaddingTop(0.0f);
            cell.setPaddingBottom(15.0f);
        }
        return cell;
    }

    /**
     * 创建单元格（指定字体、水平..、边框宽度：0表示无边框、内边距）
     *
     * @param value
     * @param font
     * @param align
     * @param borderWidth
     * @param paddingSize
     * @param flag
     * @return
     */
    public PdfPCell createCell(String value, Font font, int align, float[] borderWidth, float[] paddingSize, boolean flag) {
        PdfPCell cell = new PdfPCell();
        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
        cell.setHorizontalAlignment(align);
        cell.setPhrase(new Phrase(value, font));
        cell.setBorderWidthLeft(borderWidth[0]);
        cell.setBorderWidthRight(borderWidth[1]);
        cell.setBorderWidthTop(borderWidth[2]);
        cell.setBorderWidthBottom(borderWidth[3]);
        cell.setPaddingTop(paddingSize[0]);
        cell.setPaddingBottom(paddingSize[1]);
        if (flag) {
            cell.setColspan(2);
        }
        return cell;
    }
/**------------------------创建表格单元格的方法end----------------------------*/


/**--------------------------创建表格的方法start------------------- ---------*/
    /**
     * 创建默认列宽，指定列数、水平(居中、右、左)的表格
     *
     * @param colNumber
     * @param align
     * @return
     */
    public PdfPTable createTable(int colNumber, int align) {
        PdfPTable table = new PdfPTable(colNumber);
        try {
            table.setTotalWidth(maxWidth);
            table.setLockedWidth(true);
            table.setHorizontalAlignment(align);
            table.getDefaultCell().setBorder(1);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return table;
    }

    /**
     * 创建指定列宽、列数的表格
     *
     * @param widths
     * @return
     */
    public PdfPTable createTable(float[] widths) {
        PdfPTable table = new PdfPTable(widths);
        try {
            table.setTotalWidth(maxWidth);
            table.setLockedWidth(true);
            table.setHorizontalAlignment(Element.ALIGN_CENTER);
            table.getDefaultCell().setBorder(1);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return table;
    }

    /**
     * 创建空白的表格
     *
     * @return
     */
    public PdfPTable createBlankTable() {
        PdfPTable table = new PdfPTable(1);
        table.getDefaultCell().setBorder(0);
        table.addCell(createCell("", keyfont));
        table.setSpacingAfter(20.0f);
        table.setSpacingBefore(20.0f);
        return table;
    }
/**--------------------------创建表格的方法end------------------- ---------*/
}
